package com.yeraphael.mapper;


import com.yeraphael.entity.Clazz;
import com.yeraphael.entity.ClazzQueryParam;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ClazzMapper {
    List<Clazz> getAll(ClazzQueryParam param);

    void addClazz(Clazz clazz);

    @Select("select * from clazz where id = #{id}")
    Clazz getById(Integer id);

    void updateClazz(Clazz clazz);

    @Delete("delete from clazz where id = #{id}")
    void deleteClazz(Integer id);

    @Select("select id, name, room, begin_date, end_date, master_id, subject, create_time, update_time  from clazz")
    List<Clazz> getAllList();
}
